
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Graphics;
using Xeno_Race.Graphics;
using Xeno_Race.Helpers;
#endregion

namespace Xeno_Race.GameScreens
{
	/// <summary>
	/// Credits screen
	/// </summary>
	class Credits : IGameScreen
	{
		#region Properties
		/// <summary>
		/// Name of this game screen
		/// </summary>
		/// <returns>String</returns>
		public string Name
		{
			get
			{
				return "credits";
			} // get
		} // Name

		private bool quit = false;
		/// <summary>
		/// Returns true if we want to quit this screen and return to the
		/// previous screen. If no more screens are left the game is exited.
		/// </summary>
		/// <returns>Bool</returns>
		public bool Quit
		{
			get
			{
				return quit;
			} // get
		} // Quit

		/// <summary>
		/// Reset camera when starting.
		/// </summary>
		public bool resetCamera = true;
		#endregion

		#region Constructor
		/// <summary>
		/// Create Credits Screen
		/// </summary>
        public Credits()
		{
		}
		#endregion

		#region Run
		/// <summary>
		/// Run game screen. Called each frame.
		/// </summary>
		/// <param name="game">Form for access to other stuff</param>
		public void Run(XenoGame game)
		{
			// Render background first
			game.RenderMenuBackground();              

            // Render menu items
            game.logoImg.Render(36, 22);
            game.linesImg.Render(0, 180);
            
            game.backButton.Render(1024-300, 768-70, game.fadeXenoRed);

            TextureFont.WriteText(382, 320, "IST Team 4");
            TextureFont.WriteText(390, 352, "Daniel Joynes");
            TextureFont.WriteText(390, 384, "John Garber");
            TextureFont.WriteText(390, 416, "Dave Franchini");
            TextureFont.WriteText(390, 448, "Robert Lofton");

            TextureFont.WriteText(382, 496, "German Team 7");
            TextureFont.WriteText(390, 528, "Kristina Matzat");
            TextureFont.WriteText(390, 560, "Florian Raith");
            TextureFont.WriteText(390, 592, "Andreas Hanft");


            if ((game.currentInputState.StartButton && !game.previousInputState.StartButton) ||
                (game.currentInputState.ExitButton && !game.previousInputState.ExitButton) ||
                (game.currentInputState.XButton && !game.previousInputState.XButton) ||
                (game.currentInputState.AButton && !game.previousInputState.AButton))
            {
                game.Sounds.play(SoundManager.Sound.Sounds.Click);
                quit = true;
            }

		} // Run(game)
		#endregion
	} // class MainMenu
}